<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
<head>
<title>Test Graph</title> 
 
<script type="text/javascript" src="canvaspie.js"></script>
 
<style type="text/css">
 
</style>
</head> 

<body>

<canvas id="test" width="500" height="500" style="float:left"></canvas>
<div id="test_key" style="float:left;"></div>

<div style="clear:both;"></div>

<script type="text/javascript">

pie_array = new Array();
pie_array[0] = ['Pies', 50, 'blue'];
pie_array[1] = ['Cakes', 20, '#b100a2'];
pie_array[2] = ['Pastries', 40, '#123456'];
pie_array[3] = ['Falafels', 45, 'rgb(255,108,0)'];
pie_array[4] = ['Handcuffs', 33];

cp = new CanvasPie(document.getElementById('test'), pie_array, document.getElementById('test_key'));

</script>

<BR/><BR/>
<canvas id="test2" width="200" height="200" style="float:left"></canvas>
<div id="test_key2" style="float:left;"></div>

<div style="clear:both;"></div>

<script type="text/javascript">

pie_array = new Array();
pie_array[0] = ['Pies', 50];
pie_array[1] = ['Cakes', 20];
pie_array[2] = ['Pastries', 40];
pie_array[3] = ['Falafels', 45];
pie_array[4] = ['Handcuffs', 33];
pie_array[5] = ['Slugs', 50];
pie_array[6] = ['Passports', 20];
pie_array[7] = ['Trumpets', 40];
pie_array[8] = ['Bonobos', 45];
pie_array[9] = ['Night Lights', 33];

cp2 = new CanvasPie(document.getElementById('test2'), pie_array, document.getElementById('test_key2'), 1);
cp2.drawGraph();
cp2.drawKey();

</script>

</body>
</html>